import request from '@/utils/request';

export const getQueryList = (params) => {
	return request({
		url: '/system/dict/type/list',
		method: 'GET',
		params,
	});
};
// 查询字典类型列表
export const listType = (params) =>
	request({
		url: '/system/dict/type/list',
		params,
	});

// 查询字典类型详细
export const getType = (dictId) =>
	request({
		url: '/system/dict/type/' + dictId,
	});

// 新增字典类型
export const addType = (data) =>
	request({
		url: '/system/dict/type',
		method: 'post',
		data: data,
	});

// 修改字典类型
export const updateType = (data) =>
	request({
		url: '/system/dict/type',
		method: 'put',
		data: data,
	});

// 删除字典类型
export const delType = (dictId) =>
	request({
		url: '/system/dict/type/' + dictId,
		method: 'delete',
	});

// 清理参数缓存
export const clearCache = () =>
	request({
		url: '/system/dict/type/clearCache',
		method: 'delete',
	});

// 获取字典选择框列表
export const optionselect = () =>
	request({
		url: '/system/dict/type/optionselect',
	});
